﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<header id="header" class="navbar navbar-default navbar-fixed-top zz-navbar">

  <div class="container">

    <!-- brand header -->
    <div class="navbar-header">

      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#zz-navbar-collapse">
        <span class="sr-only">SR toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    
      <a class="navbar-brand" href="${ctx}/home" title="众投湾">
        <img src="${ctx.resource}/img/logo_word.png">
      </a>

    </div>

    <div class="collapse navbar-collapse" id="zz-navbar-collapse">

      <ul class="nav navbar-nav zz-navbar-nav">
        <li class="${activeMenu == 'home' ? 'active' : ''}"><a href="${ctx}/home">首&nbsp;&nbsp;页</a></li>
        <li class="${activeMenu == 'startups' ? 'active' : ''}"><a href="${ctx}/startups">创业项目</a></li>
        <li class="${activeMenu == 'investors' ? 'active' : ''}"><a href="${ctx}/institutions">投资人</a></li>
        <li><a href="#">创业论坛</a></li>
      </ul>

	  <sec:authorize access="isAuthenticated()" var="isLoginUser" />
      <ul class="nav navbar-nav zz-navbar-nav navbar-right">
		<c:choose>
        <c:when test="${isLoginUser}">
          <%@ include file="/WEB-INF/include/welcome.jsp" %>	
        </c:when>
        <c:otherwise>
          <li class="${activeMenu == 'login' ? 'active' : ''}"><a href="${ctx}/login">登&nbsp;&nbsp;录</a></li>
          <li class="${activeMenu == 'signup' ? 'active' : ''}"><a href="${ctx}/signup">注&nbsp;&nbsp;册</a></li>
		</c:otherwise>
		</c:choose>
      </ul>
    </div>

  </div>

</header>